home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 April / EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso / EARCD / comm / bbs / Hydra11s.lha / HBBS / Source / Common / defines.h < prev    next >
Text File  |  1996-10-09  |  12KB  |  344 lines

  1. // defines for askmsg->flags for CONTROL program
  2. #define ASK_BBSGLOBAL 1
  3.  
  4. // defines for askmsg->flags for NODE program
  5. #define ASK_STATUS 20
  6.  
  7.  
  8. // error messages for HBBS_LogError()
  9.  
  10. #define ERR_NO_ERROR 0
  11. #define ERR_ERROR_OPENING 1
  12. #define ERR_ERROR_READING 2
  13. #define ERR_ERROR_WRITING 3
  14. #define ERR_GENERAL 4
  15. #define ERR_NODESETTINGS 5
  16. #define ERR_DOORTIMEOUT 6
  17.  
  18. // if ya change any of the errors here don't forget to update the array
  19. // of error msg strings in errors.h
  20.  
  21. #define TYPE_NONE 0
  22. #define TYPE_FATAL 1
  23. #define TYPE_CRITICAL 2
  24. #define TYPE_IMPORTANT 3
  25. #define TYPE_WARNING 4
  26. #define TYPE_DONTCARE 5
  27.  
  28. #define TYPE_MEMORY 6 // a bit different to the above types...
  29.  
  30. #define BIG_STR 1024 // ppplenty long enough.. and just to be on the (very) safe
  31.                      // side of long sprintf's :-)
  32.  
  33. #define VTYPE_TIME 1
  34. #define VTYPE_SMALLNUM 2
  35. #define VTYPE_BIGNUM 3
  36. #define VTYPE_STRING 4
  37. #define VTYPE_BOOL 5
  38. #define VTYPE_STRINGLIST 6
  39. #define VTYPE_FLAGS 7
  40. #define VTYPE_PATH 8
  41. #define VTYPE_PATHLIST 9
  42. #define VTYPE_WORD 10
  43. #define VTYPE_DATE 11
  44.  
  45. #define OPT_SINGLE 0
  46. #define OPT_MULTI 1
  47.  
  48. // possible node status's
  49.  
  50. #define STAT_CLOSED 0
  51. #define STAT_LOADING 1
  52. #define STAT_INITIALIZING 2
  53. #define STAT_READY 3
  54. #define STAT_ONLINE 4
  55. #define STAT_CLOSING 5
  56.  
  57. // gets sent to Node Program when you want a node to shutdown..
  58.  
  59. #define STAT_REQUESTCLOSE 6
  60.  
  61. // send to node program if you want it to open or close it's window (NOT UserScreen tho!, just the node control window)
  62. #define STAT_OPENWINDOW 7
  63. #define STAT_CLOSEWINDOW 8
  64. // send to node program if you want it to open or close it's UserScreen
  65. #define STAT_OPENSCREEN 9
  66. #define STAT_CLOSESCREEN 10
  67.  
  68. // login types..
  69.  
  70. #define LOGIN_NONE   0
  71. #define LOGIN_REMOTE 1
  72. #define LOGIN_LOCAL  2
  73.  
  74. // possible flags for displaying information in the ctrl window's status bar!
  75.  
  76. #define UPD_NODESTATUS 1
  77.  
  78. // define some string lengths
  79.  
  80. #define LEN_NODESTATNAME  10
  81. #define LEN_CURRENTLINE   1024  // should be PLENTY..
  82. #define LEN_MAXDOORRETURN 255
  83. #define LEN_DATESTR       12 // DD-MMM-YYYY + Terminator
  84. #define LEN_TIMESTR       9 // HH:MM:SS + Terminator
  85.  
  86. // defines for request message types
  87.  
  88. #define REQ_UPDATEINFO 1 // tells control program to update the currently displayed
  89.                          // list above the Information gadget (callers/dls/ul's....)
  90.  
  91.  
  92. // message types
  93.  
  94. //#define mtype_ASK 1
  95. #define mtype_STATUS 2
  96. #define mtype_DOORACTIVITY 3
  97. #define mtype_DOORIO 4
  98. #define mtype_REQUEST 5
  99. #define mtype_CHECK 6
  100.  
  101. // door status message types..
  102.  
  103. #define DMSG_DOORSTARTED 1
  104. #define DMSG_DOORFINISHED 2
  105.  
  106. // door io message types
  107.  
  108. #define DOORIO_WRITECONSTR          1
  109. #define DOORIO_WRITECONDATA         2
  110. #define DOORIO_WRITESERSTR          3
  111. #define DOORIO_WRITESERDATA         4
  112. #define DOORIO_WRITESTR             5
  113. #define DOORIO_GETLINE              6
  114. #define DOORIO_SYSTEMDOOR           7
  115. #define DOORIO_USERDOOR             8
  116. #define DOORIO_HANGUP               9
  117. #define DOORIO_DISPLAYSCREEN        10
  118. #define DOORIO_DISPLAYSPECIALSCREEN 11
  119. #define DOORIO_PAUSEPROMPT          12
  120. #define DOORIO_ADDLASTUPLOAD        13
  121. #define DOORIO_CONTINUEPROMPT       14
  122. #define DOORIO_MENUPROMPT           15
  123. #define DOORIO_CHECKRAW             16
  124.  
  125. // getline flags!
  126.  
  127. #define GL_NONE      0   // default
  128. #define GL_HISTORY   1   // if set history is enabled (up/down cursor keys)
  129. #define GL_LINEWRAP  2   // if maxlen is reached then data back to the last ' ' character is copied to N_ND->CurrentLineWrap and returns immediately
  130. #define GL_IMMEDIATE 4   // returns when maxlen is reached
  131. #define GL_NORETURN  8   // does not print a cr+lf when a) reached maxlen or b) timeout or c) return press
  132. #define GL_EDIT      16  // enables cursor left/right and backspace/delete
  133. #define GL_DISPLAY   32  // display chars (don't specify for "Press [return] to contine" type prompts)
  134. #define GL_SYSOP     64  // does not write to, or read from, the serial port
  135. #define GL_USECHARS  128 // see N_ND->CharsAllowed
  136. #define GL_NOBEEP    256 // use with GL_USECHARS if you don't want a beep when
  137.                          // the presses a key not in N_ND->CharsAllowed
  138. #define GL_NOOLM     512 // (No OLM) if set olm's will not inturrpt the user
  139. #define GL_NODISTURB 1024// Lets you use things like "Enter ID: [    ]" with out the ] moving
  140. #define GL_CVTUPPER  2048// converts input chars to uppercase as the keys are pressed!
  141.  
  142. // pass this to LoadNodeDataSettings if you want the hbbs:nodes/nodeglobal file
  143.  
  144. #define NODE_GLOBAL 200000
  145.  
  146. #define IN_CONSOLE 1
  147. #define IN_SERIAL 2
  148.  
  149. #define GET_ANYWHERE 0
  150. #define GET_SERIAL 1
  151. #define GET_CONSOLE 2
  152.  
  153. #define DEF_CONBUFLEN 2048  // default lenghts used to allocate NodeData->ConBuffer
  154. #define DEF_SERBUFLEN 2048  // default lenghts used to allocate NodeData->SerBuffer
  155.   // note: these may be reallocated by the program to a different length,
  156.   // so check NodeData->Con/SerBufferLen for actual current length!
  157.  
  158. #define IN_NOTHING 0       // (reserved)
  159.  
  160. #define IN_GOTLINE 1       // returned if function actually got a line of
  161.                            // text
  162. #define IN_LOSSCARRIER 2   // retuned only if N_ND->Logintype!=LOGIN_NONE
  163.                            // or sysop logged user off! :-)
  164. #define IN_LOGIN 3         // returned if N_ND->LoginType==LOGIN_NONE and
  165.                            // sysop wants to local login
  166. #define IN_SHUTDOWN 4      // will never be returned to a door,
  167.                            // only to AwaitConnect();
  168.                            // due the the fact that N_ND->RequestShutdown can only
  169.                            // be set if there's no user online and therefore
  170.                            // no door can be running!
  171. #define IN_IMMEDIATE 5
  172.  
  173. #define IN_TERMINAL 6
  174.  
  175. #define IN_TIMEOUT 7
  176.  
  177. #define IN_ENDCHAT 8
  178.  
  179. #define IN_DISPLAYAWAIT 9  // if sysop presses F4 at await connect prompt you'll get this..
  180.  
  181. #define IN_DIALOUT 10  // if sysop presses F4 at await connect prompt you'll get this..
  182.  
  183.  
  184. #define DEF_WINSIG         (1L << NodeWnd->UserPort->mp_SigBit)
  185. #define DEF_CONWINSIG      (1L << N_ND->ConWin->UserPort->mp_SigBit)
  186. #define DEF_INFOWINSIG     (1L << InfoWin->UserPort->mp_SigBit)
  187. #define DEF_SETTINGSWINSIG (1L << SettingsWin->UserPort->mp_SigBit)
  188. #define DEF_CONSIG         (1L << N_ND->ConRPort->mp_SigBit)
  189. #define DEF_SERSIG         (1L << N_ND->SerPort->mp_SigBit)
  190. #define DEF_PORTSIG        (1L << N_ND->NodePort->mp_SigBit)
  191. #define DEF_TIMERSIG       (1L << N_ND->NodeTimer->TimerPort->mp_SigBit)
  192.  
  193. // the lengths of the strings in the user data file..
  194.  
  195. // update user editor GUI string max chars values if you modify these..
  196.  
  197. #define LEN_HANDLE          25
  198. #define LEN_REALNAME        30
  199. #define LEN_GROUP           30
  200. #define LEN_GEOLOCATION     20
  201. #define LEN_COUNTRY         20
  202. #define LEN_PHONENUMBER     20
  203. #define LEN_PASSWORD        20
  204. #define LEN_COMPUTERTYPE    40
  205. #define LEN_SENTBY          48 // *C* needs to be 45
  206. #define LEN_TIMEACCESS      32 // same as max filename length!
  207. #define LEN_CONFACCESSFILE  32
  208. #define LEN_LEECHACCESSFILE 32
  209. #define MAX_ACCESSSETTINGS        4096       // 4k is not unreasonably large..
  210.                                              // nor to small..  think about it,
  211.                                              // are we really going to have
  212.                                              // 4096 access flags ??
  213.  
  214. // tells node what to update..
  215.  
  216. #define UPD_NAME     1
  217. #define UPD_GROUP    2
  218. #define UPD_ACTION   3
  219. #define UPD_CPSBAUD  4
  220.  
  221. // string lengths for action
  222.  
  223. #define MAX_ACTION_LEN 29
  224. #define MAX_CPSBAUD_LEN 8
  225. #define MAX_GROUP_LEN 20
  226. #define MAX_NAME_LEN 20
  227.  
  228. #define TIMEOUT_DOORLOAD 10 // ten seconds..
  229.  
  230.  
  231. #define OS_ONLINE TRUE
  232. #define OS_OFFLINE FALSE
  233.  
  234. // flags for UserData->Status
  235.  
  236. #define USER_NEW          'N'
  237. #define USER_VALIDATED    'V'
  238. #define USER_DELETED      'D' // may be reinstated
  239. #define USER_INACTIVE     'I' // *N* users may login to inactive accounts at the moment,
  240.                               // this setting just helps sysops find inactive accounts
  241. #define USER_LOGINSDENIED 'L'
  242. #define USER_OVERWRITABLE 'O' // all related mail stuff, files, stats should be gone if this is set..
  243.  
  244.  
  245. // screen names,  use these when calling DOOR_DisplaySpecialScreen()
  246.  
  247. #define SSCREEN_PRIVATESYSTEM "PRIVATESYSTEM"
  248. #define SSCREEN_PRIVATENODE "PRIVATENODE"
  249. #define SSCREEN_BBSTITLE "BBSTITLE"
  250. #define SSCREEN_NONEWAT_ALL "NONEWAT_ALL"
  251. #define SSCREEN_NONEWAT_THISTIME "NONEWAT_THISTIME"
  252. #define SSCREEN_GUESTLOGIN "GUESTLOGIN"
  253. #define SSCREEN_JOINED "JOINED"
  254. #define SSCREEN_LOGINLOGO "LOGINLOGO"
  255. #define SSCREEN_BULLETIN "BULLETIN"
  256. #define SSCREEN_CONFBULLETIN "CONFBULLETIN"
  257.  
  258. // user level types..
  259.  
  260. #define USERTYPE_NORMAL 'N'
  261. #define USERTYPE_EXPERT 'X'
  262.  
  263. // protocol directional types
  264.  
  265. #define PTYPE_UNIDIRECTIONAL 1
  266. #define PTYPE_BIDIRECTIONAL 2
  267.  
  268. // node flags             bits
  269.  
  270. #define NFLG_NONE         0
  271. #define NFLG_BLOCKSERIAL  1
  272. #define NFLG_PAGED        2
  273. #define NFLG_CTRLC        4
  274. #define NFLG_OLMSWAITING  8
  275. #define NFLG_HANDLINGOLM  16
  276.  
  277. // flags for DOOR_ContinuePrompt()
  278.  
  279. #define DEFAULT_NONE 0
  280. #define DEFAULT_YES  1
  281. #define DEFAULT_NO   2
  282. #define DCP_ADDYN    4
  283.  
  284.  
  285. // used in N_ND->Actions, to set an access flag just use the follow:
  286. //
  287. // N_ND->Actions[ACTN_<action>]=ACTC_<action>;
  288. //
  289. // where <action> is one of the names below...
  290. // if you add actions you must recomile the node program!
  291.  
  292. #define ACTC_NONE            ' '   // all ACTC's default to this
  293.  
  294. #define ACTN_HACK                0
  295. #define ACTC_HACK            'H'   // user failed to enter a correct password
  296. #define ACTN_CARRIERLOST         1
  297. #define ACTC_CARRIERLOST     'L'   // user lost carrier!
  298. #define ACTN_FILESCAN            2
  299. #define ACTC_FILESCAN        'S'   // user scanned one or more filelists (FR,N,Z or F)
  300. #define ACTN_WROTEMAIL           3
  301. #define ACTC_WROTEMAIL       'W'   // user wrote some mail
  302. #define ACTN_READMAIL            4
  303. #define ACTC_READMAIL        'R'   // user read some mail
  304. #define ACTN_PAGED               5
  305. #define ACTC_PAGED           'P'   // user used the 'O' door to page the sysop
  306. #define ACTN_UPLOAD              6
  307. #define ACTC_UPLOAD          'U'   // user uploaded files
  308. #define ACTN_FAILEDUPLOAD        7
  309. #define ACTC_FAILEDUPLOAD    'u'   // user failed an upload transfer
  310. #define ACTN_DOWNLOAD            8
  311. #define ACTC_DOWNLOAD        'D'   // user downloaded a file
  312. #define ACTN_FAILEDDOWNLOAD      9
  313. #define ACTC_FAILEDDOWNLOAD  'd'   // user failed to dow3nload 1 or more files
  314. #define ACTN_CHANGEDSETTINGS     10
  315. #define ACTC_CHANGEDSETTINGS 'C'   // user uses a 'W' type door
  316. #define ACTN_CHATTEDTOSYSOP      11
  317. #define ACTC_CHATTEDTOSYSOP  '1'   // sysop chatted to the user!  (via SysopChat door)
  318. #define ACTN_NUKEDFILES          12
  319. #define ACTC_NUKEDFILES      'X'   // user used the nuker!
  320. #define ACTN_NEWUSER             13
  321. #define ACTC_NEWUSER         'N'   // user is a new user
  322. #define ACTN_USEDSHELL           14
  323. #define ACTC_USEDSHELL       '!'   // user used a bbs shell to access the bbs computer directly
  324.  
  325. #define LEN_ACTIONS              15 // must be last ACTN_blah + 1
  326.  
  327. // flags for LoadConfig()     bits
  328.  
  329. #define LCFG_NONE             0
  330. #define LCFG_NOSTRIPCOMMENTS  1
  331. #define LCFG_NOSTRIPSPACES    2
  332.  
  333. // flags for CheckRaw()       bits
  334.  
  335. #define CR_NONE               0
  336. #define CR_NOSERIAL           1
  337. #define CR_NOCONSOLE          2
  338.  
  339. // WARNING: Never wait on CheckRaw() using only CR_NOSERIAL when the login type
  340. //          is LOGIN_LOCAL otherwise you'll end up in a permanent loop.
  341.  
  342. #define LEN_DIZWIDTH 45 // used to be 48 chars and not defined anywhere...
  343.  
  344.